package com.qianying.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 订单类型实体类
 */
@Data
@TableName("order_type")
@Schema(description = "订单类型信息")
public class OrderType {

    @Schema(description = "主键ID", example = "1")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "订单类型名称", required = true, example = "标准订单")
    @TableField("order_type_name")
    private String orderTypeName;

    @Schema(description = "订单类型代号", required = true, example = "ST")
    @TableField("order_type_code")
    private String orderTypeCode;

    @Schema(description = "订单类型说明", example = "常规的产品购买订单，适用于大多数客户的一般采购需求")
    @TableField("description")
    private String description;

    @Schema(description = "创建时间", example = "2025-08-04 10:30:00")
    @TableField(value = "create_time", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2025-08-04 15:45:00")
    @TableField(value = "update_time", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
